﻿// Original author contact info: Owen Emlen (owene_1998@yahoo.com)
// Note: other individuals may also have contributed to this code
// Project hosted on CodePlex.com as of 1/10/2009 at http://www.codeplex.com/EmlenMud
using System;
using System.Xml.Serialization;
using System.Text;
using System.Threading;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using BrainTechLLC.ThreadSafeObjects;
using System.Runtime.Serialization;
#if USE_HYPER
using Hyper.ComponentModel;
#endif

namespace BrainTechLLC
{
	public class GeneralEventToPerceive : EventToPerceive
	{
		public IEvent ShowToSource { get; set; }
		public IEvent ShowToTarget { get; set; }
		public IEvent ShowToObservers { get; set; }

		public override IEvent GetPerceivedEvent(IEventPerceiver showTo)
		{
			if (_sources != null && _sources.Contains(showTo.AssociatedID))
				return ShowToSource;
			else if (_targets != null && _targets.Contains(showTo.AssociatedID))
				return ShowToTarget;
			else
				return ShowToObservers;
		}
	}
}